Optimal. Leaf size=557 \[ -\frac {2 (2 c C d-5 B c e+4 b C e) \sqrt {d+e x} \sqrt {a+b x+c x^2}}{15 c^2 e}+\frac {2 C (d+e x)^{3/2} \sqrt {a+b x+c x^2}}{5 c e}+\frac {\sqrt {2} \sqrt {b^2-4 a c} \left (8 b^2 C e^2-c e (3 b C d+10 b B e+9 a C e)-c^2 \left (2 C d^2-5 e (B d+3 A e)\right )\right ) \sqrt {d+e x} \sqrt {-\frac {c \left (a+b x+c x^2\right )}{b^2-4 a c}} E\left (\sin ^{-1}\left (\frac {\sqrt {\frac {b+\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}}}{\sqrt {2}}\right )|-\frac {2 \sqrt {b^2-4 a c} e}{2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e}\right )}{15 c^3 e^2 \sqrt {\frac {c (d+e x)}{2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e}} \sqrt {a+b x+c x^2}}+\frac {2 \sqrt {2} \sqrt {b^2-4 a c} (2 c C d-5 B c e+4 b C e) \left (c d^2-b d e+a e^2\right ) \sqrt {\frac {c (d+e x)}{2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e}} \sqrt {-\frac {c \left (a+b x+c x^2\right )}{b^2-4 a c}} F\left (\sin ^{-1}\left (\frac {\sqrt {\frac {b+\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}}}{\sqrt {2}}\right )|-\frac {2 \sqrt {b^2-4 a c} e}{2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e}\right )}{15 c^3 e^2 \sqrt {d+e x} \sqrt {a+b x+c x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.53, antiderivative size = 557, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {1667, 846, 857,
732, 435, 430} \begin {gather*} \frac {\sqrt {2} \sqrt {b^2-4 a c} \sqrt {d+e x} \sqrt {-\frac {c \left (a+b x+c x^2\right )}{b^2-4 a c}} \left (-c e (9 a C e+10 b B e+3 b C d)-\left (c^2 \left (2 C d^2-5 e (3 A e+B d)\right )\right )+8 b^2 C e^2\right ) E\left (\text {ArcSin}\left (\frac {\sqrt {\frac {b+2 c x+\sqrt {b^2-4 a c}}{\sqrt {b^2-4 a c}}}}{\sqrt {2}}\right )|-\frac {2 \sqrt {b^2-4 a c} e}{2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e}\right )}{15 c^3 e^2 \sqrt {a+b x+c x^2} \sqrt {\frac {c (d+e x)}{2 c d-e \left (\sqrt {b^2-4 a c}+b\right )}}}+\frac {2 \sqrt {2} \sqrt {b^2-4 a c} \sqrt {-\frac {c \left (a+b x+c x^2\right )}{b^2-4 a c}} \left (a e^2-b d e+c d^2\right ) \sqrt {\frac {c (d+e x)}{2 c d-e \left (\sqrt {b^2-4 a c}+b\right )}} (4 b C e-5 B c e+2 c C d) F\left (\text {ArcSin}\left (\frac {\sqrt {\frac {b+2 c x+\sqrt {b^2-4 a c}}{\sqrt {b^2-4 a c}}}}{\sqrt {2}}\right )|-\frac {2 \sqrt {b^2-4 a c} e}{2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e}\right )}{15 c^3 e^2 \sqrt {d+e x} \sqrt {a+b x+c x^2}}-\frac {2 \sqrt {d+e x} \sqrt {a+b x+c x^2} (4 b C e-5 B c e+2 c C d)}{15 c^2 e}+\frac {2 C (d+e x)^{3/2} \sqrt {a+b x+c x^2}}{5 c e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 430
Rule 435
Rule 732
Rule 846
Rule 857
Rule 1667
Rubi steps
\begin {align*} \int \frac {\sqrt {d+e x} \left (A+B x+C x^2\right )}{\sqrt {a+b x+c x^2}} \, dx &=\frac {2 C (d+e x)^{3/2} \sqrt {a+b x+c x^2}}{5 c e}+\frac {2 \int \frac {\sqrt {d+e x} \left (-\frac {1}{2} e (b C d-5 A c e+3 a C e)-\frac {1}{2} e (2 c C d-5 B c e+4 b C e) x\right )}{\sqrt {a+b x+c x^2}} \, dx}{5 c e^2}\\ &=-\frac {2 (2 c C d-5 B c e+4 b C e) \sqrt {d+e x} \sqrt {a+b x+c x^2}}{15 c^2 e}+\frac {2 C (d+e x)^{3/2} \sqrt {a+b x+c x^2}}{5 c e}+\frac {4 \int \frac {\frac {1}{4} e \left (4 b^2 C d e+4 a b C e^2-b c d (C d+5 B e)+c e (15 A c d-7 a C d-5 a B e)\right )+\frac {1}{4} e \left (8 b^2 C e^2-c e (3 b C d+10 b B e+9 a C e)-c^2 \left (2 C d^2-5 e (B d+3 A e)\right )\right ) x}{\sqrt {d+e x} \sqrt {a+b x+c x^2}} \, dx}{15 c^2 e^2}\\ &=-\frac {2 (2 c C d-5 B c e+4 b C e) \sqrt {d+e x} \sqrt {a+b x+c x^2}}{15 c^2 e}+\frac {2 C (d+e x)^{3/2} \sqrt {a+b x+c x^2}}{5 c e}+\frac {\left ((2 c C d-5 B c e+4 b C e) \left (c d^2-b d e+a e^2\right )\right ) \int \frac {1}{\sqrt {d+e x} \sqrt {a+b x+c x^2}} \, dx}{15 c^2 e^2}+\frac {\left (8 b^2 C e^2-c e (3 b C d+10 b B e+9 a C e)-c^2 \left (2 C d^2-5 e (B d+3 A e)\right )\right ) \int \frac {\sqrt {d+e x}}{\sqrt {a+b x+c x^2}} \, dx}{15 c^2 e^2}\\ &=-\frac {2 (2 c C d-5 B c e+4 b C e) \sqrt {d+e x} \sqrt {a+b x+c x^2}}{15 c^2 e}+\frac {2 C (d+e x)^{3/2} \sqrt {a+b x+c x^2}}{5 c e}+\frac {\left (\sqrt {2} \sqrt {b^2-4 a c} \left (8 b^2 C e^2-c e (3 b C d+10 b B e+9 a C e)-c^2 \left (2 C d^2-5 e (B d+3 A e)\right )\right ) \sqrt {d+e x} \sqrt {-\frac {c \left (a+b x+c x^2\right )}{b^2-4 a c}}\right ) \text {Subst}\left (\int \frac {\sqrt {1+\frac {2 \sqrt {b^2-4 a c} e x^2}{2 c d-b e-\sqrt {b^2-4 a c} e}}}{\sqrt {1-x^2}} \, dx,x,\frac {\sqrt {\frac {b+\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}}}{\sqrt {2}}\right )}{15 c^3 e^2 \sqrt {\frac {c (d+e x)}{2 c d-b e-\sqrt {b^2-4 a c} e}} \sqrt {a+b x+c x^2}}+\frac {\left (2 \sqrt {2} \sqrt {b^2-4 a c} (2 c C d-5 B c e+4 b C e) \left (c d^2-b d e+a e^2\right ) \sqrt {\frac {c (d+e x)}{2 c d-b e-\sqrt {b^2-4 a c} e}} \sqrt {-\frac {c \left (a+b x+c x^2\right )}{b^2-4 a c}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {1+\frac {2 \sqrt {b^2-4 a c} e x^2}{2 c d-b e-\sqrt {b^2-4 a c} e}}} \, dx,x,\frac {\sqrt {\frac {b+\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}}}{\sqrt {2}}\right )}{15 c^3 e^2 \sqrt {d+e x} \sqrt {a+b x+c x^2}}\\ &=-\frac {2 (2 c C d-5 B c e+4 b C e) \sqrt {d+e x} \sqrt {a+b x+c x^2}}{15 c^2 e}+\frac {2 C (d+e x)^{3/2} \sqrt {a+b x+c x^2}}{5 c e}+\frac {\sqrt {2} \sqrt {b^2-4 a c} \left (8 b^2 C e^2-c e (3 b C d+10 b B e+9 a C e)-c^2 \left (2 C d^2-5 e (B d+3 A e)\right )\right ) \sqrt {d+e x} \sqrt {-\frac {c \left (a+b x+c x^2\right )}{b^2-4 a c}} E\left (\sin ^{-1}\left (\frac {\sqrt {\frac {b+\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}}}{\sqrt {2}}\right )|-\frac {2 \sqrt {b^2-4 a c} e}{2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e}\right )}{15 c^3 e^2 \sqrt {\frac {c (d+e x)}{2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e}} \sqrt {a+b x+c x^2}}+\frac {2 \sqrt {2} \sqrt {b^2-4 a c} (2 c C d-5 B c e+4 b C e) \left (c d^2-b d e+a e^2\right ) \sqrt {\frac {c (d+e x)}{2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e}} \sqrt {-\frac {c \left (a+b x+c x^2\right )}{b^2-4 a c}} F\left (\sin ^{-1}\left (\frac {\sqrt {\frac {b+\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}}}{\sqrt {2}}\right )|-\frac {2 \sqrt {b^2-4 a c} e}{2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e}\right )}{15 c^3 e^2 \sqrt {d+e x} \sqrt {a+b x+c x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 29.25, size = 992, normalized size = 1.78 \begin {gather*} \frac {\left (\frac {2 (c C d+5 B c e-4 b C e)}{15 c^2 e}+\frac {2 C x}{5 c}\right ) \sqrt {d+e x} \left (a+b x+c x^2\right )}{\sqrt {a+x (b+c x)}}-\frac {2 (d+e x)^{3/2} \sqrt {a+b x+c x^2} \left (\left (-8 b^2 C e^2+c e (3 b C d+10 b B e+9 a C e)+c^2 \left (2 C d^2-5 e (B d+3 A e)\right )\right ) \left (c \left (-1+\frac {d}{d+e x}\right )^2+\frac {e \left (b-\frac {b d}{d+e x}+\frac {a e}{d+e x}\right )}{d+e x}\right )+\frac {i \sqrt {1-\frac {2 \left (c d^2+e (-b d+a e)\right )}{\left (2 c d-b e+\sqrt {\left (b^2-4 a c\right ) e^2}\right ) (d+e x)}} \sqrt {1+\frac {2 \left (c d^2+e (-b d+a e)\right )}{\left (-2 c d+b e+\sqrt {\left (b^2-4 a c\right ) e^2}\right ) (d+e x)}} \left (\left (2 c d-b e+\sqrt {\left (b^2-4 a c\right ) e^2}\right ) \left (8 b^2 C e^2-c e (3 b C d+10 b B e+9 a C e)+c^2 \left (-2 C d^2+5 e (B d+3 A e)\right )\right ) E\left (i \sinh ^{-1}\left (\frac {\sqrt {2} \sqrt {\frac {c d^2-b d e+a e^2}{-2 c d+b e+\sqrt {\left (b^2-4 a c\right ) e^2}}}}{\sqrt {d+e x}}\right )|-\frac {-2 c d+b e+\sqrt {\left (b^2-4 a c\right ) e^2}}{2 c d-b e+\sqrt {\left (b^2-4 a c\right ) e^2}}\right )+\left (8 b^3 C e^3-b^2 e^2 \left (11 c C d+10 B c e+8 C \sqrt {\left (b^2-4 a c\right ) e^2}\right )+c \left (c d \sqrt {\left (b^2-4 a c\right ) e^2} (2 C d-5 B e)-15 A c e^2 \left (2 c d+\sqrt {\left (b^2-4 a c\right ) e^2}\right )+a e^2 \left (14 c C d+10 B c e+9 C \sqrt {\left (b^2-4 a c\right ) e^2}\right )\right )+b c e \left (15 A c e^2-17 a C e^2+3 C d \sqrt {\left (b^2-4 a c\right ) e^2}+5 B \left (3 c d e+2 e \sqrt {\left (b^2-4 a c\right ) e^2}\right )\right )\right ) F\left (i \sinh ^{-1}\left (\frac {\sqrt {2} \sqrt {\frac {c d^2-b d e+a e^2}{-2 c d+b e+\sqrt {\left (b^2-4 a c\right ) e^2}}}}{\sqrt {d+e x}}\right )|-\frac {-2 c d+b e+\sqrt {\left (b^2-4 a c\right ) e^2}}{2 c d-b e+\sqrt {\left (b^2-4 a c\right ) e^2}}\right )\right )}{2 \sqrt {2} \sqrt {\frac {c d^2+e (-b d+a e)}{-2 c d+b e+\sqrt {\left (b^2-4 a c\right ) e^2}}} \sqrt {d+e x}}\right )}{15 c^3 e^3 \sqrt {a+x (b+c x)} \sqrt {\frac {(d+e x)^2 \left (c \left (-1+\frac {d}{d+e x}\right )^2+\frac {e \left (b-\frac {b d}{d+e x}+\frac {a e}{d+e x}\right )}{d+e x}\right )}{e^2}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(8160\) vs.
\(2(493)=986\).
time = 0.18, size = 8161, normalized size = 14.65
method | result | size |
elliptic | \(\frac {\sqrt {\left (c \,x^{2}+b x +a \right ) \left (e x +d \right )}\, \left (\frac {2 C x \sqrt {c e \,x^{3}+b e \,x^{2}+c d \,x^{2}+a e x +b d x +a d}}{5 c}+\frac {2 \left (B e +C d -\frac {2 \left (2 e b +2 c d \right ) C}{5 c}\right ) \sqrt {c e \,x^{3}+b e \,x^{2}+c d \,x^{2}+a e x +b d x +a d}}{3 c e}+\frac {2 \left (A d -\frac {2 a d C}{5 c}-\frac {2 \left (B e +C d -\frac {2 \left (2 e b +2 c d \right ) C}{5 c}\right ) \left (\frac {a e}{2}+\frac {b d}{2}\right )}{3 c e}\right ) \left (-\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}+\frac {d}{e}\right ) \sqrt {\frac {x +\frac {d}{e}}{-\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}+\frac {d}{e}}}\, \sqrt {\frac {x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}}{-\frac {d}{e}-\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}}}\, \sqrt {\frac {x +\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}}{\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}-\frac {d}{e}}}\, \EllipticF \left (\sqrt {\frac {x +\frac {d}{e}}{-\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}+\frac {d}{e}}}, \sqrt {\frac {\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}-\frac {d}{e}}{-\frac {d}{e}-\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}}}\right )}{\sqrt {c e \,x^{3}+b e \,x^{2}+c d \,x^{2}+a e x +b d x +a d}}+\frac {2 \left (A e +B d -\frac {2 C \left (\frac {3 a e}{2}+\frac {3 b d}{2}\right )}{5 c}-\frac {2 \left (B e +C d -\frac {2 \left (2 e b +2 c d \right ) C}{5 c}\right ) \left (e b +c d \right )}{3 c e}\right ) \left (-\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}+\frac {d}{e}\right ) \sqrt {\frac {x +\frac {d}{e}}{-\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}+\frac {d}{e}}}\, \sqrt {\frac {x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}}{-\frac {d}{e}-\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}}}\, \sqrt {\frac {x +\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}}{\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}-\frac {d}{e}}}\, \left (\left (-\frac {d}{e}-\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}\right ) \EllipticE \left (\sqrt {\frac {x +\frac {d}{e}}{-\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}+\frac {d}{e}}}, \sqrt {\frac {\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}-\frac {d}{e}}{-\frac {d}{e}-\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}}}\right )+\frac {\left (-b +\sqrt {-4 a c +b^{2}}\right ) \EllipticF \left (\sqrt {\frac {x +\frac {d}{e}}{-\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}+\frac {d}{e}}}, \sqrt {\frac {\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}-\frac {d}{e}}{-\frac {d}{e}-\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}}}\right )}{2 c}\right )}{\sqrt {c e \,x^{3}+b e \,x^{2}+c d \,x^{2}+a e x +b d x +a d}}\right )}{\sqrt {e x +d}\, \sqrt {c \,x^{2}+b x +a}}\) | \(955\) |
risch | \(\text {Expression too large to display}\) | \(2597\) |
default | \(\text {Expression too large to display}\) | \(8161\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.09, size = 554, normalized size = 0.99 \begin {gather*} \frac {2 \, {\left ({\left (2 \, C c^{3} d^{3} + {\left (2 \, C b c^{2} - 5 \, B c^{3}\right )} d^{2} e + {\left (7 \, C b^{2} c + 30 \, A c^{3} - 2 \, {\left (6 \, C a + 5 \, B b\right )} c^{2}\right )} d e^{2} - {\left (8 \, C b^{3} + 15 \, {\left (B a + A b\right )} c^{2} - {\left (21 \, C a b + 10 \, B b^{2}\right )} c\right )} e^{3}\right )} \sqrt {c} e^{\frac {1}{2}} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c^{2} d^{2} - b c d e + {\left (b^{2} - 3 \, a c\right )} e^{2}\right )} e^{\left (-2\right )}}{3 \, c^{2}}, -\frac {4 \, {\left (2 \, c^{3} d^{3} - 3 \, b c^{2} d^{2} e - 3 \, {\left (b^{2} c - 6 \, a c^{2}\right )} d e^{2} + {\left (2 \, b^{3} - 9 \, a b c\right )} e^{3}\right )} e^{\left (-3\right )}}{27 \, c^{3}}, \frac {{\left (c d + {\left (3 \, c x + b\right )} e\right )} e^{\left (-1\right )}}{3 \, c}\right ) + 3 \, {\left (2 \, C c^{3} d^{2} e + {\left (3 \, C b c^{2} - 5 \, B c^{3}\right )} d e^{2} - {\left (8 \, C b^{2} c + 15 \, A c^{3} - {\left (9 \, C a + 10 \, B b\right )} c^{2}\right )} e^{3}\right )} \sqrt {c} e^{\frac {1}{2}} {\rm weierstrassZeta}\left (\frac {4 \, {\left (c^{2} d^{2} - b c d e + {\left (b^{2} - 3 \, a c\right )} e^{2}\right )} e^{\left (-2\right )}}{3 \, c^{2}}, -\frac {4 \, {\left (2 \, c^{3} d^{3} - 3 \, b c^{2} d^{2} e - 3 \, {\left (b^{2} c - 6 \, a c^{2}\right )} d e^{2} + {\left (2 \, b^{3} - 9 \, a b c\right )} e^{3}\right )} e^{\left (-3\right )}}{27 \, c^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c^{2} d^{2} - b c d e + {\left (b^{2} - 3 \, a c\right )} e^{2}\right )} e^{\left (-2\right )}}{3 \, c^{2}}, -\frac {4 \, {\left (2 \, c^{3} d^{3} - 3 \, b c^{2} d^{2} e - 3 \, {\left (b^{2} c - 6 \, a c^{2}\right )} d e^{2} + {\left (2 \, b^{3} - 9 \, a b c\right )} e^{3}\right )} e^{\left (-3\right )}}{27 \, c^{3}}, \frac {{\left (c d + {\left (3 \, c x + b\right )} e\right )} e^{\left (-1\right )}}{3 \, c}\right )\right ) + 3 \, {\left (C c^{3} d e^{2} + {\left (3 \, C c^{3} x - 4 \, C b c^{2} + 5 \, B c^{3}\right )} e^{3}\right )} \sqrt {c x^{2} + b x + a} \sqrt {x e + d}\right )} e^{\left (-3\right )}}{45 \, c^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {d + e x} \left (A + B x + C x^{2}\right )}{\sqrt {a + b x + c x^{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {d+e\,x}\,\left (C\,x^2+B\,x+A\right )}{\sqrt {c\,x^2+b\,x+a}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________